written logic circuits